﻿Imports TBCC.UtilityMobile
<Serializable()> _
Public Class ProjectTypeItem

    Public Sub New()
        _groupID = Guid.NewGuid().ToString().Replace("-", "_")
        _netAddress = 0
    End Sub


    Private _groupID As String
    Public Property GroupID() As String
        Get
            Return _groupID
        End Get
        Set(ByVal value As String)
            _groupID = value
        End Set
    End Property

    Private _groupname As String
    Public Property GroupName() As String
        Get
            Return _groupname
        End Get
        Set(ByVal value As String)
            _groupname = value
        End Set
    End Property


    Private _netAddress As Byte
    Public Property NetAddress() As Byte
        Get
            Return _netAddress
        End Get
        Set(ByVal value As Byte)
            _netAddress = value
        End Set
    End Property


    Private _projectID As String
    Public Property projectID() As String
        Get
            Return _projectID
        End Get
        Set(ByVal value As String)
            _projectID = value
        End Set
    End Property


    Private _listNo As Integer
    Public Property listNo() As Integer
        Get
            Return _listNo
        End Get
        Set(ByVal value As Integer)
            _listNo = value
        End Set
    End Property


    Private _remark As String
    Public Property Remark() As String
        Get
            Return _remark
        End Get
        Set(ByVal value As String)
            _remark = value
        End Set
    End Property


    Private _dateCreated As DateTime
    Public Property dateCreated() As DateTime
        Get
            Return _dateCreated
        End Get
        Set(ByVal value As DateTime)
            _dateCreated = value
        End Set
    End Property


    Public Property hasCompressor(ByVal index As Integer) As Boolean
        Get
            Select Case index
                Case 0
                    Return Me._hasCompressor1
                Case 1
                    Return Me._hasCompressor2
                Case 2
                    Return Me._hasCompressor3
                Case 3
                    Return Me._hasCompressor4
                Case 4
                    Return Me._hasCompressor5
                Case 5
                    Return Me._hasCompressor6
            End Select
        End Get
        Set(ByVal value As Boolean)
            Select Case index
                Case 0
                    _hasCompressor1 = value
                Case 1
                    _hasCompressor2 = value
                Case 2
                    _hasCompressor3 = value
                Case 3
                    _hasCompressor4 = value
                Case 4
                    _hasCompressor5 = value
                Case 5
                    _hasCompressor6 = value
                Case Else
                    msg.ShowError("无效的参数")

            End Select
        End Set
    End Property

    Private _hasCompressor1 As Boolean
    Public Property hasCompressor1() As Boolean
        Get
            Return _hasCompressor1
        End Get
        Set(ByVal value As Boolean)
            _hasCompressor1 = value
        End Set
    End Property


    Private _hasCompressor2 As Boolean
    Public Property hasCompressor2() As Boolean
        Get
            Return _hasCompressor2
        End Get
        Set(ByVal value As Boolean)
            _hasCompressor2 = value
        End Set
    End Property


    Private _hasCompressor3 As Boolean
    Public Property hasCompressor3() As Boolean
        Get
            Return _hasCompressor3
        End Get
        Set(ByVal value As Boolean)
            _hasCompressor3 = value
        End Set
    End Property


    Private _hasCompressor4 As Boolean
    Public Property hasCompressor4() As Boolean
        Get
            Return _hasCompressor4
        End Get
        Set(ByVal value As Boolean)
            _hasCompressor4 = value
        End Set
    End Property


    Private _hasCompressor5 As Boolean
    Public Property hasCompressor5() As Boolean
        Get
            Return _hasCompressor5
        End Get
        Set(ByVal value As Boolean)
            _hasCompressor5 = value
        End Set
    End Property


    Private _hasCompressor6 As Boolean
    Public Property hasCompressor6() As Boolean
        Get
            Return _hasCompressor6
        End Get
        Set(ByVal value As Boolean)
            _hasCompressor6 = value
        End Set
    End Property


    Public Property hasFan(ByVal index As Integer) As Boolean
        Get
            Select Case index
                Case 0
                    Return Me._hasFan1
                Case 1
                    Return Me._hasFan2
                Case 2
                    Return Me._hasFan3
                Case 3
                    Return Me._hasFan4
                Case 4
                    Return Me._hasFan5
                Case 5
                    Return Me._hasFan6
            End Select
        End Get
        Set(ByVal value As Boolean)
            Select Case index
                Case 0
                    _hasFan1 = value
                Case 1
                    _hasFan2 = value
                Case 2
                    _hasFan3 = value
                Case 3
                    _hasFan4 = value
                Case 4
                    _hasFan5 = value
                Case 5
                    _hasFan6 = value

            End Select
        End Set
    End Property

    Private _hasFan1 As Boolean
    Public Property hasFan1() As Boolean
        Get
            Return _hasFan1
        End Get
        Set(ByVal value As Boolean)
            _hasFan1 = value
        End Set
    End Property

    Private _hasFan2 As Boolean
    Public Property hasFan2() As Boolean
        Get
            Return _hasFan2
        End Get
        Set(ByVal value As Boolean)
            _hasFan2 = value
        End Set
    End Property

    Private _hasFan3 As Boolean
    Public Property hasFan3() As Boolean
        Get
            Return _hasFan3
        End Get
        Set(ByVal value As Boolean)
            _hasFan3 = value
        End Set
    End Property

    Private _hasFan4 As Boolean
    Public Property hasFan4() As Boolean
        Get
            Return _hasFan4
        End Get
        Set(ByVal value As Boolean)
            _hasFan4 = value
        End Set
    End Property

    Private _hasFan5 As Boolean
    Public Property hasFan5() As Boolean
        Get
            Return _hasFan5
        End Get
        Set(ByVal value As Boolean)
            _hasFan5 = value
        End Set
    End Property

    Private _hasFan6 As Boolean
    Public Property hasFan6() As Boolean
        Get
            Return _hasFan6
        End Get
        Set(ByVal value As Boolean)
            _hasFan6 = value
        End Set
    End Property


    Private _connected As Boolean = False
    ''' <summary>
    ''' 当前是否能够连通
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Property Connected() As Boolean
        Get
            Return _connected
        End Get
        Set(ByVal value As Boolean)
            _connected = value
        End Set
    End Property


    Public Overrides Function ToString() As String
        Return _groupname
    End Function

End Class
